
<#include "/common/head.html"/>

 <div class="easyui-panel addPage" data-options="fit:true,border:false,novalidate:true">
    <form class="easyui-form" id="ff" method="post" data-options="novalidate:true">
        <table class="table1">
        	
            <tr>
           		<th><span>日期：</span></th>
               	<td>
               		<input class="easyui-datebox" type="text" name="dt" value="" data-options=""></input>
           		</td>
           		<th><span>股票代码：</span></th>
               	<td>
               		<input class="easyui-textbox" type="text" name="code" value="" data-options=""></input>
           		</td>
            </tr>
            <tr>
           		<th><span>名称：</span></th>
               	<td>
               		<input class="easyui-textbox" type="text" name="name" value="" data-options=""></input>
           		</td>
           		<th><span>收盘价：</span></th>
               	<td>
               		<input class="easyui-textbox" type="text" name="closing_price" value="" data-options=""></input>
           		</td>
            </tr>
            <tr>
           		<th><span>最高价：</span></th>
               	<td>
               		<input class="easyui-textbox" type="text" name="top_price" value="" data-options=""></input>
           		</td>
           		<th><span>最低价：</span></th>
               	<td>
               		<input class="easyui-textbox" type="text" name="minimum_price" value="" data-options=""></input>
           		</td>
            </tr>
            <tr>
           		<th><span>开盘价：</span></th>
               	<td>
               		<input class="easyui-textbox" type="text" name="opening_price" value="" data-options=""></input>
           		</td>
           		<th><span>前收盘：</span></th>
               	<td>
               		<input class="easyui-textbox" type="text" name="pre" value="" data-options=""></input>
           		</td>
            </tr>
            <tr>
           		<th><span>涨跌额：</span></th>
               	<td>
               		<input class="easyui-textbox" type="text" name="change_amount" value="" data-options=""></input>
           		</td>
           		<th><span>涨跌幅：</span></th>
               	<td>
               		<input class="easyui-textbox" type="text" name="change_ratio" value="" data-options=""></input>
           		</td>
            </tr>
            <tr>
           		<th><span>成交量：</span></th>
               	<td>
               		<input class="easyui-textbox" type="text" name="turnover_volume" value="" data-options=""></input>
           		</td>
           		<th><span>成交金额：</span></th>
               	<td>
               		<input class="easyui-textbox" type="text" name="turnover_money" value="" data-options=""></input>
           		</td>
            </tr>
            <tr>
           		<th><span>创建时间：</span></th>
               	<td>
               		<input class="easyui-textbox" type="text" name="create_time" value="" data-options="required:true"></input>
           		</td>
            <td colspan="2"></td>
            </tr>
        </table>
    </form>
</div>
<script>
top.window.subPage.save = save;
function save() {
	if($("#ff").form('enableValidation').form('validate')) {
		$.post("add", getParam(), function(data) {
			top.window.closeWindow();
			top.window.subPage.loadCurrDatagrid();
		});
	}
}
function getParam() {
	var param = {
	     
       	    "model.dt": $(":input[name='dt']").val(), 
       	    "model.code": $(":input[name='code']").val(), 
       	    "model.name": $(":input[name='name']").val(), 
       	    "model.closing_price": $(":input[name='closing_price']").val(), 
       	    "model.top_price": $(":input[name='top_price']").val(), 
       	    "model.minimum_price": $(":input[name='minimum_price']").val(), 
       	    "model.opening_price": $(":input[name='opening_price']").val(), 
       	    "model.pre": $(":input[name='pre']").val(), 
       	    "model.change_amount": $(":input[name='change_amount']").val(), 
       	    "model.change_ratio": $(":input[name='change_ratio']").val(), 
       	    "model.turnover_volume": $(":input[name='turnover_volume']").val(), 
       	    "model.turnover_money": $(":input[name='turnover_money']").val(), 
       	    "model.create_time": $(":input[name='create_time']").val(), 
	}
	for(key in param) {
		if(!param[key]) {
			delete param[key];
		}
	}
	return param;
}

//扩展js
</script>
<#include "/common/foot.html"/>
